import request from '@/router/axios';
import {downloadExcel} from '@/router/axios';
import {formatCondition} from '@/util/util';
//单条查询
export const queryBizSixteenUserPfExch = (params) => {
  params.head.transCode = 'queryBizSixteenUserPfExch';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/queryBizSixteenUserPfExch',
    method: 'post',
    data: params
  })
}
//多条列表查询，支持条件查询
export const queryBizSixteenUserPfExchListPage = (params) => {
  params.head.transCode = 'queryBizSixteenUserPfExchListPage';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/queryBizSixteenUserPfExchListPage',
    method: 'post',
    data: params
  })
}
//新增单条记录
export const saveBizSixteenUserPfExch = (params) => {
  params.head.transCode = 'saveBizSixteenUserPfExch';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/saveBizSixteenUserPfExch',
    method: 'post',
    data: params
  })
}
//新增多条记录
export const saveBizSixteenUserPfExchList = (params) => {
  params.head.transCode = 'saveBizSixteenUserPfExchList';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/saveBizSixteenUserPfExchList',
    method: 'post',
    data: params
  })
}
//新增或修改单条记录
export const saveOrUpdateBizSixteenUserPfExch = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenUserPfExch';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/saveOrUpdateBizSixteenUserPfExch',
    method: 'post',
    data: params
  })
}


//新增或修改单条记录
export const saveOrUpdateBizSixteenUserPfExchList = (params) => {
  params.head.transCode = 'saveOrUpdateBizSixteenUserPfExchList';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/saveOrUpdateBizSixteenUserPfExchList',
    method: 'post',
    data: params
  })
}

//修改单条记录
export const updateBizSixteenUserPfExch = (params) => {
  params.head.transCode = 'updateBizSixteenUserPfExch';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/updateBizSixteenUserPfExch',
    method: 'post',
    data: params
  })
}

//删除单条记录
export const deleteBizSixteenUserPfExch = (params) => {
  params.head.transCode = 'deleteBizSixteenUserPfExch';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/deleteBizSixteenUserPfExch',
    method: 'post',
    data: params
  })
}

//删除多条记录
export const deleteBizSixteenUserPfExchList = (params) => {
  params.head.transCode = 'deleteBizSixteenUserPfExchList';
  return request({
    url: '/biz/sixteen/bizSixteenUserPfExch/deleteBizSixteenUserPfExchList',
    method: 'post',
    data: params
  })
}
//导出excel
export const exportBizSixteenUserPfExchExcel = (params) => {
  downloadExcel({
    url: '/biz/sixteen/bizSixteenUserPfExch/excelDownload/exportBizSixteenUserPfExchExcel',
    method: 'get',
    data: 
    {
      tenantId: params.head.tenantId,
      orders:'',
      condition: formatCondition(params.body.sqlCondition)
    }
  })
}
